package com.wonders.frame.repository;

import com.wonders.frame.entity.AuthRole;
import com.wonders.frame.repository.core.CoreRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;


@Repository
public interface AuthRoleRepository extends CoreRepository<AuthRole> {

    /*@Transactional
    @Modifying
    @Query("update AuthRole set removed=:removed where id=:id")
    void updateRemoveById(@Param(value = "id") String id, @Param(value = "removed")Integer removed);*/

     List<AuthRole> findByRemoved(Integer removed);

     List<AuthRole> findByRoleCodeAndRemoved(String roleCode ,Integer removed);

     List<AuthRole> findByRoleCodeLikeAndRoleNameLike(String roleCode_like,String roleName_like);

}
